package com.zhiwen.design.proxy.cglibProxy;

import com.zhiwen.design.proxy.SellHouse;
import com.zhiwen.design.proxy.SellHouseImpl;
import com.zhiwen.design.proxy.jdkProxy.DynamicSellHouseProxy;
import sun.rmi.transport.proxy.CGIHandler;

import java.lang.reflect.Proxy;

/**
 * @Auther: wuzhiwen
 * @Date: 2018/12/3 13:08
 * @Description:
 */
public class BuyHouseByProxy {
    public static void main(String[] args) {
        SellHouse sellHouse = new SellHouseImpl();
        CglibSellHouseProxy cglibSellHouseProxy = new CglibSellHouseProxy();
        SellHouseImpl instance = (SellHouseImpl) cglibSellHouseProxy.getInstance(sellHouse);
        instance.sellHouse();
    }
}
